package com.atguigu.bigdata.chapter05.source;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @Author lzc
 * @Date 2022/9/2 9:04
 */
public class Flink01_Source_File {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        // 如果没有设置并行度, 并行度的值是cpu的核心数据
        DataStreamSource<String> source = env.readTextFile("hdfs://hadoop162:8020/words.txt");
        source.print();
    
    
        env.execute();
    }
}
